package com.xiaoke.mapper;

import com.github.pagehelper.Page;
import com.xiaoke.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface CommentMapper {
    int deleteByPrimaryKey(String id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    Integer countByGoods(String goodsId);

    Page<Map<String,Object>> findByGoods(String goodsId);

    List<Map<String,String>> findTop10ByGoods(String goodsId);

    Integer countByGoodsPic(String goodsId);

    Page<Map<String,Object>> findByGoodsAndPic(String goodsId);
}